package com.example.c94s3plyhyfc.bean;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.sql.Timestamp;

@Data
public class User {

    private Integer id;
    @NotEmpty(message = "用户名不能为空!")
    private String name;
    @NotEmpty(message = "密码不能为空!")
    private String pwd;

    @Email(message = "邮箱地址错误!")
    private String email;
    @Pattern(regexp = "1\\d{10}", message = "电话号码格式错误")
    private String phone;
    private String head;
    private Timestamp intime;
}
